package com.wangfugui.kafka.service;

import lombok.extern.slf4j.Slf4j;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;

/**
 * @author jieshao
 * @date 2021/11/11 12:00
 */
@Slf4j
public class CustomWatcher implements Watcher {

    @Override
    public void process(WatchedEvent event) {
        log.info("监听事件的状态: {}", event.getState());
        log.info("监听事件的路径: {}", event.getPath());
        log.info("监听事件的类型: {}", event.getType());
    }
}